package cn.ztydata.teachingsystem.heaven.web.dto;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.sql.Date;

/**
 * 教师Dto
 *
 * @author fanruiping
 * @since 2014-11-28
 */
public class TeacherDto {
    private Long id;//编号
    private String password;//密码
    private String departNum;//系部编码
    private String departName;//系部名称
    private String code;//工号
    @NotNull
    @Length(min = 1, max = 60, message = "教师名称长度应为1~60")
    private String name;//名称
    private String userPhoto;//头像
    private Date birthDate;//出生日期
    @NotNull
    @Range(min = 0, max = 1, message = "性别不合法")
    private Integer sex = 0;//性别
    @Length(max = 10, message = "学位长度应为0~10")
    private String degree;//学位
    @Length(max = 10, message = "职称长度应为0~10")
    private String place;//职称
    @Length(max = 10, message = "学历长度应为0~10")
    private String formal;//学历
    private String remark;//简介
    private String sessionId;

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDepartNum() {
        return departNum;
    }

    public void setDepartNum(String departNum) {
        this.departNum = departNum;
    }

    public String getRemark() {
        if(remark == null){
            return "";
        }
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDepartName() {
        return departName;
    }

    public void setDepartName(String departName) {
        this.departName = departName;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUserPhoto() {
        return userPhoto;
    }

    public void setUserPhoto(String userPhoto) {
        this.userPhoto = userPhoto;
    }

    public Date getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getDegree() {
        return degree;
    }

    public void setDegree(String degree) {
        this.degree = degree;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public String getFormal() {
        return formal;
    }

    public void setFormal(String formal) {
        this.formal = formal;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }
}
